package com.excilys.training.ebanking.web.test;

import junit.framework.Assert;

import org.junit.Before;
import org.junit.Test;

import com.thoughtworks.selenium.DefaultSelenium;

public class ConnexionIT extends SeleniumTest {

	@Before
	public void setUp() {
		selenium = new DefaultSelenium("localhost", 4444, "*firefox",
				"http://localhost:8080/web/");
		selenium.start();
	}

	@Test
	public void testConnexionClient() throws Exception {
		selenium.open("/web/index.html");
		selenium.type("j_username", "client");
		selenium.type("j_password", "client");
		selenium.click("validation");
		selenium.waitForPageToLoad("30000");
		Assert.assertTrue(selenium.isTextPresent("EBANKING"));
	}
}
